import Vue from 'vue'
const cash = {
    // 获取列表
    cashList: function cashList(ip, postdata) {
        var ipPath = ip + '/' + postdata.page_size + '/' + postdata.number
        return Vue.http.get(ipPath, {}).then(response => {
            if (response.status === 200) {
                return Promise.resolve(response.body)
            } else {
                return Promise.reject(response.data.message)
            }
        })
    },
    // 统一提现
    cashAcce: function cashAcce(ip, postdata) {
        return Vue.http.post(ip, postdata).then(response => {
            if (response.status === 200) {
                return Promise.resolve(response.body)
            } else {
                return Promise.reject(response.data.message)
            }
        })
    },
    // 拒绝提现
    cashRef: function cashRef(ip, postdata) {
        return Vue.http.post(ip, postdata).then(response => {
            if (response.status === 200) {
                return Promise.resolve(response.body)
            } else {
                return Promise.reject(response.data.message)
            }
        })
    }
}

export default cash